
create database IF NOT EXISTS `pocket_cloud` default character set utf8mb4 collate utf8mb4_general_ci;

CREATE USER 'pocketCloud'@'%' IDENTIFIED BY 'pocketCloud@123';
GRANT ALL ON `pocket_cloud`.* TO 'pocketCloud'@'%';
FLUSH PRIVILEGES;

USE pocket_cloud;

-- ----------------------------
-- Table structure for tz_order
-- ----------------------------
DROP TABLE IF EXISTS `tz_order`;
CREATE TABLE `tz_order` (
        `order_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
        `shop_id` bigint(20) DEFAULT NULL COMMENT '店铺id',
        `prod_name` varchar(1000) NOT NULL DEFAULT '' COMMENT '产品名称,多个产品将会以逗号隔开',
        `user_id` varchar(36) NOT NULL COMMENT '订购用户ID',
        `order_number` varchar(50) NOT NULL COMMENT '订购流水号',
        `total` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '总值',
        `actual_total` decimal(15,2) DEFAULT NULL COMMENT '实际总值',
        `pay_type` int(1) DEFAULT NULL COMMENT '支付方式 0 手动代付 1 微信支付 2 支付宝',
        `remarks` varchar(1024) DEFAULT NULL COMMENT '订单备注',
        `status` int(2) NOT NULL DEFAULT '0' COMMENT '订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:成功 6:失败',
        `dvy_type` varchar(10) DEFAULT NULL COMMENT '配送类型',
        `dvy_id` bigint(20) DEFAULT NULL COMMENT '配送方式ID',
        `dvy_flow_id` varchar(100) DEFAULT '' COMMENT '物流单号',
        `freight_amount` decimal(15,2) DEFAULT '0.00' COMMENT '订单运费',
        `addr_order_id` bigint(20) DEFAULT NULL COMMENT '用户订单地址Id',
        `product_nums` int(10) DEFAULT NULL COMMENT '订单商品总数',
        `create_time` datetime NOT NULL COMMENT '订购时间',
        `update_time` datetime DEFAULT NULL COMMENT '订单更新时间',
        `pay_time` datetime DEFAULT NULL COMMENT '付款时间',
        `dvy_time` datetime DEFAULT NULL COMMENT '发货时间',
        `finally_time` datetime DEFAULT NULL COMMENT '完成时间',
        `cancel_time` datetime DEFAULT NULL COMMENT '取消时间',
        `is_payed` tinyint(1) DEFAULT NULL COMMENT '是否已经支付，1：已经支付过，0：，没有支付过',
        `delete_status` int(1) DEFAULT '0' COMMENT '用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除',
        `refund_sts` int(1) DEFAULT '0' COMMENT '0:默认,1:在处理,2:处理完成',
        `reduce_amount` decimal(15,2) DEFAULT NULL COMMENT '优惠总额',
        `order_type` tinyint(2) DEFAULT NULL COMMENT '订单类型',
        `close_type` tinyint(2) DEFAULT NULL COMMENT '订单关闭原因 1-超时未支付 2-退款关闭 4-买家取消 15-已通过货到付款交易',
        PRIMARY KEY (`order_id`),
        UNIQUE KEY `order_number_unique_ind` (`order_number`),
        UNIQUE KEY `order_number_userid_unique_ind` (`user_id`,`order_number`),
        KEY `shop_id` (`shop_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='订单表';

-- ----------------------------
-- Records of tz_order
-- ----------------------------
BEGIN;
INSERT INTO `tz_order` VALUES (1, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '51540df5255e4d22903b0f83921095ff', '1145634946149388288', 1.01, 1.01, 1, '', 5, NULL, 14, '123656347535245', 0.00, 1, 1, '2019-07-01 18:07:11', '2019-07-01 18:07:22', '2019-07-01 18:07:22', '2019-07-03 11:06:57', '2019-08-07 17:05:00', NULL, 1, 0, 0, 0.00, NULL, NULL);
INSERT INTO `tz_order` VALUES (2, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '51540df5255e4d22903b0f83921095ff', '1146346112622399488', 1.01, 1.01, NULL, '', 6, NULL, NULL, '', 0.00, 2, 1, '2019-07-03 17:13:06', '2019-07-03 17:13:06', NULL, NULL, NULL, '2019-07-03 17:17:46', 0, 2, 0, 0.00, NULL, NULL);
INSERT INTO `tz_order` VALUES (3, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 银色 64GB ', '51540df5255e4d22903b0f83921095ff', '1146346762332672000', 7103.00, 7103.00, NULL, '', 6, NULL, NULL, '', 0.00, 3, 1, '2019-07-03 17:15:41', '2019-07-03 17:15:41', NULL, NULL, NULL, '2019-07-03 17:17:21', 0, 2, 0, 0.00, NULL, NULL);
INSERT INTO `tz_order` VALUES (4, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '51540df5255e4d22903b0f83921095ff', '1146346992126005248', 1.01, 1.01, NULL, '', 6, NULL, NULL, '', 0.00, 5, 1, '2019-07-03 17:16:36', '2019-07-03 17:16:36', NULL, NULL, NULL, '2019-07-03 17:17:17', 0, 2, 0, 0.00, NULL, NULL);
INSERT INTO `tz_order` VALUES (5, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '51540df5255e4d22903b0f83921095ff', '1146347329394184192', 1.01, 1.01, NULL, '', 6, NULL, NULL, '', 0.00, 6, 1, '2019-07-03 17:17:56', '2019-07-03 17:17:56', NULL, NULL, NULL, '2019-08-07 17:02:00', 0, 0, 0, 0.00, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for tz_order_item
-- ----------------------------
DROP TABLE IF EXISTS `tz_order_item`;
CREATE TABLE `tz_order_item` (
         `order_item_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单项ID',
         `shop_id` bigint(20) NOT NULL COMMENT '店铺id',
         `order_number` varchar(50) NOT NULL COMMENT '订单order_number',
         `prod_id` bigint(20) unsigned NOT NULL COMMENT '产品ID',
         `sku_id` bigint(20) unsigned NOT NULL COMMENT '产品SkuID',
         `prod_count` int(11) NOT NULL DEFAULT '0' COMMENT '购物车产品个数',
         `prod_name` varchar(120) NOT NULL DEFAULT '' COMMENT '产品名称',
         `sku_name` varchar(120) DEFAULT NULL COMMENT 'sku名称',
         `pic` varchar(255) NOT NULL DEFAULT '' COMMENT '产品主图片路径',
         `price` decimal(15,2) NOT NULL COMMENT '产品价格',
         `user_id` varchar(36) NOT NULL DEFAULT '' COMMENT '用户Id',
         `product_total_amount` decimal(15,2) NOT NULL COMMENT '商品总金额',
         `rec_time` datetime NOT NULL COMMENT '购物时间',
         `comm_sts` int(1) NOT NULL DEFAULT '0' COMMENT '评论状态： 0 未评价  1 已评价',
         `distribution_card_no` varchar(36) DEFAULT NULL COMMENT '推广员使用的推销卡号',
         `basket_date` datetime DEFAULT NULL COMMENT '加入购物车时间',
         PRIMARY KEY (`order_item_id`),
         KEY `order_number` (`order_number`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='订单项';

-- ----------------------------
-- Records of tz_order_item
-- ----------------------------
BEGIN;
INSERT INTO `tz_order_item` VALUES (1, 1, '1145634946149388288', 18, 314, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '换修无忧版 深空灰色 64GB ', '2019/04/2cd9ec641d92458983c00d87ff33ad57.jpg', 1.01, '51540df5255e4d22903b0f83921095ff', 1.01, '2019-07-01 18:07:11', 0, NULL, '2019-07-01 18:05:54');
INSERT INTO `tz_order_item` VALUES (2, 1, '1146346112622399488', 18, 314, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '换修无忧版 深空灰色 64GB ', '2019/04/2cd9ec641d92458983c00d87ff33ad57.jpg', 1.01, '51540df5255e4d22903b0f83921095ff', 1.01, '2019-07-03 17:13:06', 0, NULL, '2019-07-03 17:13:05');
INSERT INTO `tz_order_item` VALUES (3, 1, '1146346762332672000', 18, 317, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 银色 64GB ', '换修无忧版 银色 64GB ', '2019/04/eaa8c9bd3e7b41eaa310adbde10b6401.jpg', 7103.00, '51540df5255e4d22903b0f83921095ff', 7103.00, '2019-07-03 17:15:41', 0, NULL, '2019-07-03 17:15:40');
INSERT INTO `tz_order_item` VALUES (4, 1, '1146346992126005248', 18, 314, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '换修无忧版 深空灰色 64GB ', '2019/04/2cd9ec641d92458983c00d87ff33ad57.jpg', 1.01, '51540df5255e4d22903b0f83921095ff', 1.01, '2019-07-03 17:16:36', 0, NULL, '2019-07-03 17:16:34');
INSERT INTO `tz_order_item` VALUES (5, 1, '1146347329394184192', 18, 314, 1, 'Apple iPhone XS Max 移动联通电信4G手机  换修无忧版 深空灰色 64GB ', '换修无忧版 深空灰色 64GB ', '2019/04/2cd9ec641d92458983c00d87ff33ad57.jpg', 1.01, '51540df5255e4d22903b0f83921095ff', 1.01, '2019-07-03 17:17:56', 0, NULL, '2019-07-03 17:17:55');
COMMIT;

-- ----------------------------
-- Table structure for tz_prod
-- ----------------------------
DROP TABLE IF EXISTS `tz_prod`;
CREATE TABLE `tz_prod` (
       `prod_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '产品ID',
       `prod_name` varchar(300) NOT NULL DEFAULT '' COMMENT '商品名称',
       `shop_id` bigint(20) DEFAULT NULL COMMENT '店铺id',
       `ori_price` decimal(15,2) DEFAULT '0.00' COMMENT '原价',
       `price` decimal(15,2) DEFAULT NULL COMMENT '现价',
       `brief` varchar(500) DEFAULT '' COMMENT '简要描述,卖点等',
       `content` text COMMENT '详细描述',
       `pic` varchar(255) DEFAULT NULL COMMENT '商品主图',
       `imgs` varchar(1000) DEFAULT NULL COMMENT '商品图片，以,分割',
       `status` int(1) DEFAULT '0' COMMENT '默认是1，表示正常状态, -1表示删除, 0下架',
       `category_id` bigint(20) unsigned DEFAULT NULL COMMENT '商品分类',
       `sold_num` int(11) DEFAULT NULL COMMENT '销量',
       `total_stocks` int(11) DEFAULT '0' COMMENT '总库存',
       `delivery_mode` json DEFAULT NULL COMMENT '配送方式json见TransportModeVO',
       `delivery_template_id` bigint(20) DEFAULT NULL COMMENT '运费模板id',
       `create_time` datetime DEFAULT NULL COMMENT '录入时间',
       `update_time` datetime DEFAULT NULL COMMENT '修改时间',
       `putaway_time` datetime DEFAULT NULL COMMENT '上架时间',
       `version` int(11) DEFAULT NULL COMMENT '版本 乐观锁',
       PRIMARY KEY (`prod_id`),
       KEY `shop_id` (`shop_id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8 COMMENT='商品';

-- ----------------------------
-- Records of tz_prod
-- ----------------------------
BEGIN;
INSERT INTO `tz_prod` VALUES (18, 'Apple iPhone XS Max 移动联通电信4G手机 ', 1, 0.00, 1.01, '6.5英寸大屏，支持双卡。', '<div style=\"margin: 0px; padding: 0px; color: #666666; font-family: tahoma, arial, \'Microsoft YaHei\', \'Hiragino Sans GB\', u5b8bu4f53, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;\" align=\"center\">\n<table id=\"__01\" style=\"text-align: center;\" border=\"0\" width=\"750\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img30.360buyimg.com/cms/jfs/t1/4626/32/3475/220504/5b997365E80a1373f/279c244f12161cb3.jpg\" alt=\"\" width=\"750\" height=\"1991\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img12.360buyimg.com/cms/jfs/t1/3397/21/3533/236322/5b99759aE73795787/f782e04a140c8f16.jpg\" alt=\"\" width=\"750\" height=\"2052\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img11.360buyimg.com/cms/jfs/t1/5274/3/3465/245167/5b997365E16b81bc9/93e07e40f3af5e62.jpg\" alt=\"\" width=\"750\" height=\"2250\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img30.360buyimg.com/cms/jfs/t1/2322/11/3524/269574/5b997365E26f81a7a/e01fc9486da9eda1.jpg\" alt=\"\" width=\"750\" height=\"2327\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img13.360buyimg.com/cms/jfs/t1/5074/21/3432/296470/5b997364Ee966f7a0/7f424d41479db45d.jpg\" alt=\"\" width=\"750\" height=\"2561\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img13.360buyimg.com/cms/jfs/t1/5770/18/3580/288371/5b997365Ea2c58cb4/176b9a40ccd4e56b.jpg\" alt=\"\" width=\"750\" height=\"2668\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img11.360buyimg.com/cms/jfs/t1/227/21/3811/268132/5b997364E3d6c51b2/92d2a3a559e3baa8.jpg\" alt=\"\" width=\"750\" height=\"2850\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img20.360buyimg.com/cms/jfs/t1/3787/5/3493/125020/5b997363E3c9f5910/ddbd08a556744630.jpg\" alt=\"\" width=\"750\" height=\"1486\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img30.360buyimg.com/cms/jfs/t1/1687/5/3327/266718/5b997366E9cc80e69/9e40ceae1fef4466.jpg\" alt=\"\" width=\"750\" height=\"3376\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img30.360buyimg.com/cms/jfs/t1/457/6/3849/283318/5b997363E0c5ab7a9/6f636f0a286bc87c.jpg\" alt=\"\" width=\"750\" height=\"2455\" /></td>\n</tr>\n<tr>\n<td><img class=\"\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: middle;\" src=\"https://img10.360buyimg.com/cms/jfs/t1/397/25/3796/217624/5b9975a8E5ee578af/4d8f05a606fa5c4a.jpg\" alt=\"\" width=\"750\" height=\"2703\" /></td>\n</tr>\n</tbody>\n</table>\n</div>', '2019/04/eaa8c9bd3e7b41eaa310adbde10b6401.jpg', '2019/04/eaa8c9bd3e7b41eaa310adbde10b6401.jpg', 1, 93, NULL, 96, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-03-29 14:40:00', '2019-06-22 18:28:32', '2019-06-22 18:28:32', 85);
INSERT INTO `tz_prod` VALUES (59, '兰蔻粉水清滢柔肤水400ml 爽肤水女保湿舒缓滋润嫩肤', 1, 0.00, 420.00, '好看耐穿', '<p><img src=\"http://img-test.gz-yami.com/2019/04/71f54ee20ef34872b1e0aa53cb75b7b6.jpg\" alt=\"\" width=\"790\" height=\"1110\" /></p>', '2019/04/ce5a32005a7a4f9483a17051bda6bd6c.jpg', '2019/04/ce5a32005a7a4f9483a17051bda6bd6c.jpg,2019/04/8a8712b81a2d4f4ca3eb4a725ad229c6.jpg', 1, 87, NULL, 0, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 48, '2019-04-21 19:15:34', '2019-04-29 14:30:44', '2019-04-29 14:30:44', NULL);
INSERT INTO `tz_prod` VALUES (68, '【Dole都乐】菲律宾都乐非转基因木瓜1只 单只约410g', 1, 0.00, 26.00, '包邮 肉厚籽少 独具风味', '<p style=\"text-align: justify;\"><img src=\"http://img-test.gz-yami.com/2019/04/e7536a53a83d450e8635ce1e9819faf6.jpg\" alt=\"\" width=\"790\" height=\"350\" /></p>', '2019/04/0bfd73f43d764d20b2f0b92813abdc56.jpg', '2019/04/0bfd73f43d764d20b2f0b92813abdc56.jpg,2019/04/355020f27acd4b13a652cb830f03bedc.jpg', 1, 95, NULL, 0, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-21 21:56:38', '2019-05-22 10:30:37', '2019-05-22 10:30:37', NULL);
INSERT INTO `tz_prod` VALUES (69, '阿迪达斯官方 adidas 三叶草 NITE JOGGER 男子经典鞋BD7956', 1, 10.00, 1199.00, ' 运动鞋/休闲鞋', '<p><img src=\"http://img-test.gz-yami.com/2019/04/6d0bea4a0be54423999136bcd1158897.jpg\" alt=\"\" width=\"790\" height=\"2232\" /></p>', '2019/04/b3558ee506fb4589bfaa94a543226477.jpg', '2019/04/b3558ee506fb4589bfaa94a543226477.jpg,2019/04/df052ea31d3149fdb5c54f7c4fc6349b.jpg', 0, 88, NULL, 0, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-21 22:10:04', '2019-05-23 20:17:03', '2019-05-22 13:37:26', NULL);
INSERT INTO `tz_prod` VALUES (70, '【Dole都乐】比利时Truval啤梨12只 进口水果新鲜梨 单果120g左右', 1, 0.00, 38.00, '好吃', '<p><img src=\"http://img-test.gz-yami.com/2019/04/67ce2251e9b14ea08b87752ef7b30207.jpg\" alt=\"\" width=\"760\" height=\"488\" /></p>', '2019/04/de0edd2aaf2d4d3c8b6c3fdfde738805.jpg', '2019/04/de0edd2aaf2d4d3c8b6c3fdfde738805.jpg,2019/04/ee4530e364ca48869347e1e79915406c.jpg', 1, 95, NULL, 15, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-22 16:43:33', '2019-06-22 09:40:24', '2019-06-22 09:40:24', NULL);
INSERT INTO `tz_prod` VALUES (71, '旗舰店官网 自拍神器 梵高定制', 1, 10.00, 6998.00, '梵高定制礼盒 全球限量发售 分期免息', '<p><img src=\"http://img-test.gz-yami.com/2019/04/fa35b300102e45f3a57d7c5c775ebf6d.jpg\" alt=\"\" width=\"790\" height=\"853\" /></p>\n<p><img src=\"http://img-test.gz-yami.com/2019/04/f8fd168ddb8a437dbb5b742691bd1d02.jpg\" alt=\"\" width=\"800\" height=\"800\" /><img src=\"http://img-test.gz-yami.com/2019/04/db46108466264b48841b18437940e0b3.jpg\" alt=\"\" width=\"800\" height=\"800\" /></p>', '2019/04/667e4ce211b44c6da10891f42927fc11.jpg', '2019/04/667e4ce211b44c6da10891f42927fc11.jpg,2019/04/31c416e7020b4fe69d491bc09baaae90.jpg', 1, 85, NULL, 99, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-23 15:43:26', '2019-05-21 11:01:59', '2019-05-21 11:01:59', NULL);
INSERT INTO `tz_prod` VALUES (72, '餐厅装饰画现代简约饭厅挂画墙面壁画好好吃饭', 1, 0.00, 169.00, '创意餐厅装饰画 好好吃饭', '<p><img src=\"http://img-test.gz-yami.com/2019/04/dca352cc3b0a438e95509f2cf54860de.jpg\" alt=\"\" width=\"790\" height=\"1282\" /></p>', '2019/04/299df42b0b404c338060aef5b1b11dd7.jpg', '2019/04/299df42b0b404c338060aef5b1b11dd7.jpg,2019/04/bca5ff8e257f4db6aa0be42ed4393568.jpg', 1, 91, NULL, 0, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-25 10:22:21', '2019-04-29 14:29:25', '2019-04-29 14:29:25', NULL);
INSERT INTO `tz_prod` VALUES (73, '阴阳师寮办秘制 月见和菓子 184克', 1, 0.00, 22.00, '三层夹心，Q弹有料', '<p><img src=\"http://img-test.gz-yami.com/2019/04/77f70d0c32c44294a2c80273262fa5fc.jpg\" alt=\"\" width=\"750\" height=\"750\" /></p>', '2019/04/60c6300596504c10bd80d6365647b078.jpg', '2019/04/60c6300596504c10bd80d6365647b078.jpg,2019/04/11175723eae8431cabda164e0e197cb1.jpg', 1, 95, NULL, 77, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-04-27 11:37:13', '2019-05-21 13:56:10', '2019-05-21 13:56:10', NULL);
INSERT INTO `tz_prod` VALUES (74, '旺仔牛奶', 2, 0.00, 100.00, '测试', '<p>测试商品</p>', '2019/05/b1a4bf7612554dbc8395f22e22d531c8.jpg', '2019/05/b1a4bf7612554dbc8395f22e22d531c8.jpg', 1, 95, NULL, 0, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 48, '2019-05-22 10:39:49', '2019-05-22 10:39:49', '2019-05-22 10:39:49', NULL);
INSERT INTO `tz_prod` VALUES (75, '测试商品A', 1, 30.00, 30.00, '', '<p>测试</p>', '2019/05/65525bbccee04ec5a094f38ce61d6b86.jpg', '2019/05/65525bbccee04ec5a094f38ce61d6b86.jpg', 1, 95, NULL, 30, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-05-23 17:23:11', '2019-06-22 09:40:13', '2019-06-22 09:40:13', NULL);
INSERT INTO `tz_prod` VALUES (76, '测试商品B', 1, 40.00, 40.00, 'BBBB', '<p>测试</p>', '2019/05/150d6c4a46914dbfa82690098b2ec4e7.jpg', '2019/05/150d6c4a46914dbfa82690098b2ec4e7.jpg', 1, 95, NULL, 40, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-05-23 17:24:06', '2019-06-22 09:40:06', '2019-06-22 09:40:06', NULL);
INSERT INTO `tz_prod` VALUES (77, '测试商品C', 1, 60.00, 50.00, 'CCC', '<p>CCCC</p>', '2019/05/1bdd097dbffd477799a7aca949377b20.jpg', '2019/05/1bdd097dbffd477799a7aca949377b20.jpg', 1, 95, NULL, 50, '{\"hasUserPickUp\": false, \"hasShopDelivery\": true}', 47, '2019-05-23 17:24:48', '2019-06-22 09:39:59', '2019-06-22 09:39:59', NULL);
COMMIT;

-- ----------------------------
-- Table structure for tz_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_user`;
CREATE TABLE `tz_sys_user` (
       `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
       `username` varchar(50) NOT NULL COMMENT '用户名',
       `password` varchar(100) DEFAULT NULL COMMENT '密码',
       `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
       `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
       `status` tinyint(4) DEFAULT NULL COMMENT '状态  0：禁用   1：正常',
       `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建者ID',
       `create_time` datetime DEFAULT NULL COMMENT '创建时间',
       `shop_id` bigint(20) DEFAULT NULL COMMENT '用户所在的商城Id',
       PRIMARY KEY (`user_id`),
       UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统用户';

-- ----------------------------
-- Records of tz_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_user` VALUES (1, 'admin', '{bcrypt}$2a$10$AV9Xz.3ck4RsXiad5ArcBO5.ZKwlpcnJzs740BHY..fsSp0PnM/Zu', 'root@123.com', '11111111111', 1, 1, '2016-11-11 11:11:11', 1);
COMMIT;

/*Table structure for table `tz_order_settlement` */
DROP TABLE IF EXISTS `tz_order_settlement`;
CREATE TABLE `tz_order_settlement` (
       `settlement_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '支付结算单据ID',
       `pay_no` varchar(36) DEFAULT NULL COMMENT '支付单号',
       `biz_pay_no` varchar(255) DEFAULT NULL COMMENT '外部订单流水号',
       `order_number` varchar(36) DEFAULT NULL COMMENT 'order表中的订单号',
       `pay_type` int(1) DEFAULT NULL COMMENT '支付方式 1 微信支付 2 支付宝',
       `pay_type_name` varchar(50) DEFAULT NULL COMMENT '支付方式名称',
       `pay_amount` decimal(15,2) DEFAULT NULL COMMENT '支付金额',
       `is_clearing` int(1) DEFAULT NULL COMMENT '是否清算 0:否 1:是',
       `user_id` varchar(36) DEFAULT NULL COMMENT '用户ID',
       `create_time` datetime NOT NULL COMMENT '创建时间',
       `clearing_time` datetime DEFAULT NULL COMMENT '清算时间',
       `version` int(11) DEFAULT NULL COMMENT '版本号',
       `pay_status` int(1) DEFAULT NULL COMMENT '支付状态',
       PRIMARY KEY (`settlement_id`),
       UNIQUE KEY `primary_order_no` (`order_number`),
       KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

insert  into `tz_order_settlement`(`settlement_id`,`pay_no`,`biz_pay_no`,`order_number`,`pay_type`,`pay_type_name`,`pay_amount`,`is_clearing`,`user_id`,`create_time`,`clearing_time`,`version`,`pay_status`) values
(1,'1145634947151826944',NULL,'1145634946149388288',1,NULL,1.01,0,'51540df5255e4d22903b0f83921095ff','2019-07-01 18:07:11',NULL,1,1),
(2,'1146346113691947008',NULL,'1146346112622399488',1,NULL,1.01,0,'51540df5255e4d22903b0f83921095ff','2019-07-03 17:13:06',NULL,0,0),
(3,'1146346763158949888',NULL,'1146346762332672000',1,NULL,7103.00,0,'51540df5255e4d22903b0f83921095ff','2019-07-03 17:15:41',NULL,0,0),
(4,'1146346992977448960',NULL,'1146346992126005248',1,NULL,1.01,0,'51540df5255e4d22903b0f83921095ff','2019-07-03 17:16:36',NULL,0,0),
(5,'1146347417931747328',NULL,'1146347329394184192',1,NULL,1.01,0,'51540df5255e4d22903b0f83921095ff','2019-07-03 17:17:56',NULL,0,0);
